#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 110;
const int MOD = 998244353;

int n, K;
ll dp[N][N][N], inv[N];
ll l[N], r[N];


ll qpow(ll a, ll b) {
    ll res = 1;
    while (b) {
        if (b & 1) res = res * a % MOD;
        a = a * a % MOD;
        b >>= 1;
    }
    return res;
}

void init() {
    for (int i = 1; i < 110; i++) {
        inv[i] = qpow(i, MOD - 2);
    }
}
int main() {
    cin >> n >> K;
    ll minl = 200, maxr = -1;
    for (int i = 1; i <= n; i++) {
        cin >> l[i] >> r[i];
        minl = min(minl, l[i]);
        maxr = max(maxr, r[i]);
    }

    init();
    ll res = 0;
    for (ll A = minl; A <= maxr; A++) {
        memset(dp, 0, sizeof(dp));
        dp[0][0][0] = 1; // 没有数，那么只有0 0 一种情况

        for (int i = 1; i <= n; i++) {

            for (int j = 0; j < K; j++) {
                for (int k = 0; k <= i; k++) {
                    // cout << k << ',' << i << endl;
                    ll& x = dp[i][j][k];
                    // case 1: 左边
                    if (A >= l[i]) { // 能选得到才有意义
                        ll temp = dp[i - 1][j][k] * (min(r[i], A) - l[i]) % MOD;
                        temp = temp * inv[r[i] - l[i]] % MOD;
                        x = (x + temp) % MOD;
                    }

                    // case2
                    if (l[i] <= A && A + 1 <= r[i] && k >= 1) {
                        ll temp = dp[i - 1][j][k - 1] * inv[r[i] - l[i]] % MOD;
                        x = (x + temp) % MOD;
                    }

                    // case 3:
                    if (A + 1 <= r[i] && j >= 1) {
                        ll temp = dp[i - 1][j - 1][k] * (r[i] - max(l[i], A + 1)) % MOD;
                        temp = temp * inv[r[i] - l[i]] % MOD;
                        x = (x + temp) % MOD;
                    }
                }
            }

            for (int j = 0; j < K; j++)
                for (int s = 0; s <= n; s++)
                    if (K - j <= s) {
                        ll aa = dp[n][j][s];
                        ll temp1 = (K-j)*inv[s+1] % MOD;
                        ll temp2 = (A+1+MOD-temp1) % MOD;
                        res += aa * temp2 % MOD;
                        res %= MOD;
                    }

        }
    }

    cout << res << endl;
    return 0;
}